import request from '@/utils/request'

// 查询称重记录列表
export function listWeigh(query) {
  return request({
    url: '/system/weigh/list',
    method: 'get',
    params: query
  })
}

// 查询称重记录详细
export function getWeigh(id) {
  return request({
    url: '/system/weigh/' + id,
    method: 'get'
  })
}

export function peelWeigh(data) {
  return request({
    url: '/system/peelWeigh/',
    method: 'post',
    data: data
  })
}

// 新增称重记录
export function addWeigh(data) {
  return request({
    url: '/system/weigh',
    method: 'post',
    data: data
  })
}

// 修改称重记录
export function updateWeigh(data) {
  return request({
    url: '/system/weigh',
    method: 'put',
    data: data
  })
}

// 删除称重记录
export function delWeigh(id) {
  return request({
    url: '/system/weigh/' + id,
    method: 'delete'
  })
}

//批量去皮
export function someWeigh(data) {
  return request({
    url: '/system/weigh/peelWeighs',
    method: 'post',
    data: data
  })
}

//去皮
export function peelingRecordWeigh(data) {
  return request({
    url: '/system/weigh/peelWeigh',
    method: 'post',
    data: data
  })
}

//去皮
export function goodsReceipt(data) {
  return request({
    url: '/system/weigh/goodsReceipt',
    method: 'post',
    data: data
  })
}
